<div>
	<div id="${dialogId}" style='width: 1000px;' data-dojo-type='ism.widgets.Dialog' data-dojo-attach-point='dialog'
		data-dojo-props='title: "${dialogTitle}", sendCertificate: false, sendPassword: false, 
		    instruction: "${instruction}",
			autofocus: false, 
            onEnter: function() {
				if(!dijit.byId("${dialogId}_saveButton").get("disabled")) {
					dojo.publish("${dialogId}_saveButton", ""); 
				} 
			},  
			closeButtonLabel: "${nls.messaging.dialog.cancelButton}",
			buttons: [ new dijit.form.Button({ 
				label: "${nls.messaging.dialog.saveButton}",
				id: "${dialogId}_saveButton",
				onClick: function() { dojo.publish("${dialogId}_saveButton", ""); }
			}),
				new dijit.form.Button({ 
				label: "${nls.messaging.dialog.testButton}",
				id: "${dialogId}_testButton", 
				onClick: function() { dojo.publish("${dialogId}_testButton", ""); }
			    }) ]'>

		<form id="${dialogId}_form" data-dojo-type="dijit.form.Form">
			<div style='float: left; display: inline-block; width: 470px' id='${dialogId}_leftGroup'>
				<!-- left section -->
				<div style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
				<div id="${dialogId}_url" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_URL'
					data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
					data-dojo-props='inputWidth: "220px",
					label: "${urlLabel}:",
					labelAlignment: "horizontal",
					labelWidth: "180px",
					intermediateChanges: true,
					instantValidate: false,
					tooltipContent: "${urlTooltip}",                        
					required: true,
					pattern: "(l|L)(d|D)(a|A)(p|P)(s|S)?\:\/\/.*",
					invalidMessage: "${urlThemeError}"'></div>
				</div>
				<div style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
				<div id="${dialogId}_certBox" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_Certificate'
					data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
					data-dojo-props='readOnly: true,
					label: "${certificateLabel}:",
					hint: "${browseHint}",
					hintPosition: "inside",
					labelAlignment: "horizontal",
					alignWithRequired: true,
					tooltipContent: "",
					labelWidth: "180px",
					inputWidth: "210px"'></div>
				</div>
				<div id="${dialogId}_certBrowse" style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
				<input type="file" id="${dialogId}_fileUploader" style="display:none"
                    data-dojo-attach-point="fileUploader" data-dojo-attach-event="onChange:handleFileChangeEvent" />
                </div>
                <div id="${dialogId}_fileUploaderButton" style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
                <button id="${dialogId}_fileUploaderButton" style='padding-left: 188px;' data-dojo-type="dijit.form.Button" class="browseButton" 
                    tabindex="1" style="margin: 0" data-dojo-attach-event="onClick:clickFileUploaderButton">${browseLabel}</button>
				</div>
				<div id="${dialogId}_certClear" style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
				<button id="${dialogId}_clearCertButton" style='padding-left: 137px;' data-dojo-type="dijit.form.Button" 
                    tabindex="1" style="margin: 0" data-dojo-attach-event="onClick:resetFiles">${clearLabel}</button>
				</div>
                <div style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
                    <select multiple="false" data-dojo-type='ism.widgets.Select'
                            data-dojo-attach-point='field_CheckServerCert'
                            id="${dialogId}_certCheck"
                            data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                            data-dojo-props='label: "${checkcertLabel}", 
                                    required: false,
                                    labelAlignment: "horizontal",
                                    groupAlignment: "horizontal",
                                    tooltipContent: "${!checkcertTooltip}",
                                    alignWithRequired: true,
                                    labelWidth: "180px",
                                    inputWidth: "210px"
                                    '>
                        <option value="TrustStore" selected="true">${nls.messaging.externldap.dialog.checkcertTStoreOpt}</option>
                        <option value="PublicTrust">${nls.messaging.externldap.dialog.checkcertPublicTOpt}</option>
                        <option value="DisableVerify">${nls.messaging.externldap.dialog.checkcertDisableOpt}</option>
                    </select>
                </div>
                <!-- LDAP Connection Settings section -->
                <div style='padding: 15px 20px 5px 1px; display: block; text-align: center;'>
                    <h3>${nls.messaging.externldap.dialog.connSubHeading}</h3>
                </div>
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                <div id="${dialogId}_timeout" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_Timeout'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='inputWidth: "80px", 
                    label: "${timeoutLabel}:",
                    labelAlignment: "horizontal",
                    alignWithRequired: true,
                    labelWidth: "220",
                    tooltipContent: "${timeoutTooltip}", 
                    unit: "${unitLabel}"'></div>
                </div>
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                    <div class='idxLabel dijitInline' id='${dialogId}_dm_label_EnableCache'
                    style='width: 216px; display: inline-block;'>
                    <span style='padding: 0 7px;'></span>
                    <span class='ismWidgetLabel'>${nls.messaging.externldap.dialog.enableCache}:</span>

                    <div id="${dialogId}_enableCache_Hover" href="#bogus1" role="tooltip" aria-labelledby="${dialogId}_enableCache_Tooltip" 
                        style='display: inline-block' tabindex="0" class="ismWidgetHoverHelpIcon"
                        onmouseover="idx.widget.HoverHelpTooltip.defaultPosition=['above', 'below']"></div>
                    <span id="${dialogId}_enableCache_Tooltip"
                        data-dojo-type="idx.widget.HoverHelpTooltip"
                        data-dojo-props='connectId:["${dialogId}_enableCache_Hover"], forceFocus: true, showLearnMore:false'>${nls.messaging.externldap.dialog.tooltip.enableCache}</span>
                    </div>
                    <div id="${dialogId}_enableCache_CheckBox" data-dojo-type='idx.form.CheckBox' aria-labelledby='${dialogId}_dm_label_enableCache'
                    	 data-dojo-attach-point='field_EnableCache' data-dojo-attach-event='onChange:resetSuccessOrFailMessage' data-dojo-props='width: "50px", checked: true'></div>
                </div>
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                <div id="${dialogId}_cacheTimeout" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_CacheTimeout'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='inputWidth: "80px",  
                    label: "${cachetimeoutLabel}:",
                    labelAlignment: "horizontal",
                    alignWithRequired: true,
                    labelWidth: "220",
                    tooltipContent: "${cachetimeoutTooltip}", 
                    unit: "${unitLabel}"'></div>
                </div>
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                <div id="${dialogId}_groupCacheTimeout" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_GroupCacheTimeout'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='inputWidth: "80px",  
                    label: "${groupcachetimeoutLabel}:",
                    labelAlignment: "horizontal",
                    alignWithRequired: true,
                    labelWidth: "220",
                    tooltipContent: "${groupcachetimeoutTooltip}", 
                    unit: "${unitLabel}"'></div>
                </div>				
			<!-- end left section -->
			</div>
			<div style='float: left; display: inline-block; width: 460px;' id='${dialogId}_rightGroup'> 
			<!-- right section -->
                <div style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
                <div id="${dialogId}_baseDN" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_BaseDN'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='width: "150px", 
                    label: "${basednLabel}:",
                    labelAlignment: "horizontal",
                    labelWidth: "220",
                    tooltipContent: "${basednTooltip}",                        
                    required: true'></div>
                </div>
                <div style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
                <div id="${dialogId}_bindDN" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_BindDN'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='width: "150px", 
                    label: "${binddnLabel}:",
                    labelAlignment: "horizontal",
                    labelWidth: "220",
                    tooltipContent: "${binddnTooltip}",
                    alignWithRequired: true'></div>
                </div>
                <div style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
                <div id="${dialogId}_bindPassword" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_BindPassword'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='width: "150px", 
                    label: "${bindpwLabel}:",
                    labelAlignment: "horizontal",
                    labelWidth: "220",
                    hint: "",
                    hintPosition: "inside",
                    tooltipContent: "${bindpwTooltip}",
                    type: "password",
                    alignWithRequired: true'></div>
                </div>
                <div id="${dialogId}_bindpwClear" style='padding: 1px 1px 5px 1px; display: block; margin-right: 20px;'>
                    <button id="${dialogId}_clearBindPwButton" style='padding-left: 227px;' data-dojo-type="dijit.form.Button"
                        tabindex="1" style="margin: 0" data-dojo-attach-event="onClick:clickClearBindPassword">${clearBindpwLabel}</button>
                </div>
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                <div id="${dialogId}_userIDMap" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_UserIdMap'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='width: "150px", 
                    label: "${useridmapLabel}:",
                    labelAlignment: "horizontal",
                    labelWidth: "220",
                    tooltipContent: "${useridmapTooltip}", 
                    required: true'></div>
                </div>			    
				<div style='padding: 1px 1px 5px 1px; display: block;'>
				<div id="${dialogId}_userSuffix" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_UserSuffix'
					data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
					data-dojo-props='width: "220px", 
					label: "${userSuffixLabel}:",
					labelAlignment: "horizontal",
					labelWidth: "220",
					tooltipContent: "${userSuffixTooltip}",                   
					required: false,
					alignWithRequired: true'></div>
				</div>
                 <div style='padding: 1px 1px 5px 1px; display: block;'>
                    <div class='idxLabel dijitInline' id='${dialogId}_dm_label_nestedGroupSearch'
                    style='width: 216px; display: inline-block;'>
                    <span style='padding: 0 7px;'></span>
                    <span class="ismWidgetLabel">${nls.messaging.externldap.dialog.nestedGroupSearch}:</span>

                    <div id="${dialogId}_nestedGroupSearch_Hover" href="#bogus1" role="tooltip" aria-labelledby='${dialogId}_nestedGroupSearch_Tooltip'
                        style='display: inline-block' tabindex="0" class="ismWidgetHoverHelpIcon"
                        onmouseover="idx.widget.HoverHelpTooltip.defaultPosition=['above', 'below']"></div>
                    <span id="${dialogId}_nestedGroupSearch_Tooltip"
                        data-dojo-type="idx.widget.HoverHelpTooltip"
                        data-dojo-props='connectId:["${dialogId}_nestedGroupSearch_Hover"], forceFocus: true, showLearnMore:false'>${nls.messaging.externldap.dialog.tooltip.nestedGroupSearch}</span>
                    </div>
                    <div id="${dialogId}_groupSearchCheckBox" data-dojo-type='idx.form.CheckBox' aria-labelledby='${dialogId}_dm_label_nestedGroupSearch'
                    	 data-dojo-attach-point='field_NestedGroupSearch' data-dojo-attach-event='onChange:resetSuccessOrFailMessage' data-dojo-props='width: "50px", checked: false'></div>
                </div>              
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                <div id="${dialogId}_groupMemberMap" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_GroupMemberIdMap'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='width: "150px", 
                    label: "${groupmemberidmapLabel}:",
                    labelAlignment: "horizontal",
                    labelWidth: "220",
                    tooltipContent: "${groupmemberidmapTooltip}",                   
                    required: true'></div>
                </div>                
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                <div id="${dialogId}_groupMap" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_GroupIdMap'
                	data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
                    data-dojo-props='width: "150px", 
                    label: "${groupidmapLabel}:",
                    labelAlignment: "horizontal",
                    labelWidth: "220",
                    tooltipContent: "${groupidmapTooltip}",                   
                    required: true'></div>
                </div>               				
				<div style='padding: 1px 1px 5px 1px; display: block;'>
				<div id="${dialogId}_groupSuffix" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_GroupSuffix'
					data-dojo-attach-event='onChange:resetSuccessOrFailMessage'
					data-dojo-props='width: "150px", 
					label: "${groupSuffixLabel}:",
					labelAlignment: "horizontal",
					labelWidth: "220",
					tooltipContent: "${groupSuffixTooltip}",                   
					required: true'></div>
				</div>
                <div style='padding: 1px 1px 5px 1px; display: block;'>
                    <div id='${dialogId}_dm_label_ignoreCase' class='idxLabel' style='width: 218px; display: inline-block'>
                       <span style='padding: 0 7px;'></span>${nls.messaging.externldap.dialog.ignorecase}:</div>
                    <div id="${dialogId}_ignoreCaseCheckBox" data-dojo-type='idx.form.CheckBox' aria-labelledby='${dialogId}_dm_label_ignoreCase'
                    	 data-dojo-attach-point='field_IgnoreCase' data-dojo-attach-event='onChange:resetSuccessOrFailMessage' data-dojo-props='width: "50px", checked: true'></div>
                </div>				
			</div>
			<div style='clear: both;'/>
		</form>
	</div>
</div>

